BackgroundRemovalPlugin

Plugin for background removal. This plugin adds a button to the Dock that removes the background of the current page's image. Add InspectorBar.Button.rememberBackgroundRemoval with inspectorBarModifier to remove the background of the selected image or page. The results are PNG files in the app's cache directory, which Android can clear. To keep them, upload the file:// URIs that engine.editor.findAllMediaURIs() returns, and point the scene to the uploads with engine.editor.relocateResource.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Background removal configuration object. Check BackgroundRemovalPlugin inheritors for available options.

Link copied to clipboard

Returns the editor dock with the background removal button inserted by dockModifier.

Link copied to clipboard

The Dock modifier in order to place the Dock.Button.rememberBackgroundRemoval button. By default, it is prepended to the dock.

Link copied to clipboard

Returns the editor inspector bar with the background removal button inserted by inspectorBarModifier, or the parent's inspector bar when inspectorBarModifier is null.

Link copied to clipboard

The InspectorBar modifier in order to place the InspectorBar.Button.rememberBackgroundRemoval button. By default, it is null, and the plugin leaves the inspector bar unchanged. To prepend the button, set inspectorBarModifier = { addFirst { InspectorBar.Button.rememberBackgroundRemoval(config = it) } }.

Link copied to clipboard
Link copied to clipboard
open var onClose: suspend EditorScope.() -> Unit?
Link copied to clipboard
open override var onCreate: suspend EditorScope.() -> Unit?

Initializes the configured background remover after the parent configuration is created.

Link copied to clipboard
open var onError: suspend EditorScope.(Throwable) -> Unit?
Link copied to clipboard
Link copied to clipboard
open var onExport: suspend EditorScope.() -> Unit?
Link copied to clipboard
open var onLoaded: suspend EditorScope.() -> Unit?
Link copied to clipboard
Link copied to clipboard